package com.atguigu.edumsm;

import javax.mail.MessagingException;

/**
 * 测试类
 */
public class test {
    public static void main(String[] args) {
        try {
            // 请将此处的 690717394@qq.com 替换为您的收件邮箱号码
            String code = String.valueOf((int) (Math.random() * 9999));
            System.out.println(code);
            MailUtil.send_mail("1732581005@qq.com", "您的验证码为：" + code);
            System.out.println("邮件发送成功!");
        } catch (MessagingException e) {
            e.printStackTrace();
        }
    }
}
